home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Resources / System / BoingBag1 / Contributions / Workbench / RexxArpLib3p6 / rexx / Requesters.rexx < prev    next >
OS/2 REXX Batch file  |  1991-04-25  |  3KB  |  82 lines

  1. /*
  2. **
  3. **   Test of rexxarplib requesters
  4. **
  5. */
  6.  
  7. /*
  8. *   First the file requester
  9. */
  10. say getfile(50,50)
  11. say getfile(50,50,,,"Hello folks")
  12. say getfile(100,50,"ram:",,"hello there")
  13. say getfile(100,50,"ram:",test,"Pattern Gadget (2.0)",,"PATGAD")
  14. say getfile(100,50,"ram:",,"ARP requester",,"DOARP")
  15. say getfile(100,0,"ram:",,"Save Requester (2.0)",,"PATGAD+SAVE",,400,200,"*.txt")
  16. say getfile(100,50,"ram:",,"Multiple Select(2.0)",,"PATGAD+MULTISELECT",mystem)
  17. say mystem.0
  18. do i = 1 to mystem.0
  19.    say mystem.i
  20. end
  21. /*
  22. *   Now the boolean/string requester
  23. */
  24. say request(25,25,"        A Boolean requester        ",,"Yes","No")
  25. say request(100,50,,,,)
  26. say request(100,50,"This is a test", ,,)
  27. say request(100,50,"This is a test\and this is another line")
  28. say request(100,50,"Here is a string gadget","String gadget")
  29. say request(100,50,"Here is a full requester\line 2\line 3","String","Okay","Cancel")
  30. say request(100,50,"Only String + Cancel is here","String",,"Don't you dare!")
  31. say request(100,50,"Only Okay is here",,"Okay")
  32. say request(100,50,"Only Cancel is here",,,"Cancel")
  33.  
  34. longstring = ""
  35. longstring = longstring||"request\"
  36. longstring = longstring||"=======\\"
  37. longstring = longstring||"       Calling sequence:\\"
  38. longstring = longstring||"       result = request(x, y, prompts, string, okaytext, canceltext)\"
  39. longstring = longstring||"       x          = x coordinate of top-left corner of requester.\"
  40. longstring = longstring||"       y          = y coordinate of top-left corner of requester.\"
  41. longstring = longstring||"       prompts    = A string which will be displayed above any gadgets.\"
  42. longstring = longstring||"                    Any embedded 'BS' characters will be treated as a line\"
  43. longstring = longstring||"                    break. Up to 9 breaks are supported (10 lines).\"
  44. longstring = longstring||"       string     = The default string to be displayed in a string gadget.\"
  45. longstring = longstring||"                    If omitted, no string gadget will be provided.\"
  46. longstring = longstring||"       okaytext   = The text to be used for an Okay gadget."
  47.  
  48. say request(0,0,longstring,"This is the longest requester...","Okay","Quit")
  49.  
  50. longstring = ""
  51. longstring = longstring||"                    If omitted, no string gadget will be provided.\"
  52. longstring = longstring||"       okaytext   = The text to be used for an Okay gadget.\"
  53. longstring = longstring||"                    If omitted, no okay gadget will be provided.\"
  54. longstring = longstring||"       canceltext = The text to be used for a Cancel gadget.\"
  55. longstring = longstring||"                    If omitted, no cancel gadget will be provided."
  56.  
  57. say request(0,0,longstring,"This is a shorter requester...","Okay","Quit")
  58.  
  59. /*
  60. *   The font requester
  61. */
  62. myfont.Name = 'topaz.font'
  63. myfont.YSize = 8
  64. myfont.Style = 0
  65. myfont.Flags = 0
  66. myfont.FrontPen = 1
  67. myfont.BackPen = 0
  68.  
  69. font = GetFont(400,60,myfont.Name,myfont.YSize,'Test fonts',,             ,
  70.                'STYLE+FRONTPEN+BACKPEN+DRAWMODE',myfont,,,myfont.Style,   ,
  71.                myfont.Flags, myfont.FrontPen, myfont.BackPen)
  72.  
  73. if font ~= "" then do
  74.    say "Name     " myfont.Name
  75.    say "YSize    " myfont.YSize
  76.    say "Style    " myfont.Style
  77.    say "Flags    " myfont.Flags
  78.    say "Frontpen " myfont.FrontPen
  79.    say "Backpen  " myfont.BackPen
  80.    say "DrawMode " myfont.DrawMode
  81. end
  82.